package com.sjb.sixteen_journey_backend.service;

import com.sjb.sixteen_journey_backend.common.R;
import com.sjb.sixteen_journey_backend.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sjb.sixteen_journey_backend.entity.dto.LoginDto;
import com.sjb.sixteen_journey_backend.entity.dto.UpdatePwdDto;
import jakarta.servlet.http.HttpSession;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author jcz
 * @since 2024-06-24
 */
public interface IUserService extends IService<User> {

    R<User> login(LoginDto loginDto) throws Exception;

    R updatePwd(UpdatePwdDto updatePwdDto);

    R deleteUser();
    R isExistUserName(String username);

    R register(User user);

    R<User> updateUserUsername(String username);

    R<User> updateUserGender(Integer gender);

    R<User> updateUserAddress(String address);

    R<User> updateUserSignature(String signature);

    R<User> updateUserAvatar(MultipartFile file);

    R<User> getUserByUserNameOrPhone(String data);

    User getUserById(Integer id);


}
